package io;

import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.nio.charset.StandardCharsets;

public class Test2 {
    public static void main(String[] args) throws IOException {
        File file = new File("./src/main/java/io");
        if (file.isDirectory()){
            File[] subs = file.listFiles();
            for (File sub:subs){
                FileInputStream fil = new FileInputStream(sub);
                byte[] by = new byte[(int)sub.length()];
                fil.read(by);
                String s = new String(by, StandardCharsets.UTF_8);
                System.out.println(s);
            }
        }
    }
}
